@f{xyvalue}ΒΆ

Displays the x- and y-coordinate of a given 1D or 2D dataset.

@f{xyvalue(datasetname, type, index)}
@f{xyvalue(datasetname, type, index, format)}

Parameters

datasetname

Is the name of a 1D or 2D dataset. To access a dataset on a different page, the page name can be added to the dataset name, separated by a colon (:), for example Data1:Page2.

type

Is the type of the coordinate:

Value Meaning
x x coordinate
y y coordinate
x_pos x coordinate: Text object will be moved to this position.
y_pos y coordinate: Text object will be moved to this position.
ymax Find the maximum value. index will be ignored. Text object will be moved to this position. If you want to set the position manually use @f{xystatvalue}.
ymin Find the mainimum value. index will be ignored. Text object will be moved to this position. If you want to set the position manually use @f{xystatvalue}.
ydiff Calculates the difference between the last and the first data point. index will be ignored.
ydiffminmax Calculates the difference between the maximum and minimum value. index will be ignored.
name Displays the channel name. Can be added to the value name separated by a period (.), i.e. @f{xyvalue(Data6, ymax.name.unit)}
unit Displays the unit name, e. g. @f{xyvalue(Data6, unit)}
enumvalue Displays the enum value of the channel at the x or y position, e. g. @f{xyvalue(Data1,ymax.enumvalue, 1,%g)}

If the string :date is added to the type name the value will be formatted as a date/time value.

index

Data point index. The Index starts with 1. If a negative index is specified, the counting starts at the last data point. Example: To read the value of the second last point index is -2.

format

Specifies the number format. The default format is %g. Example: %.3lf will print the values with 3 decimal places. For a complete description see printf. In field functions commas are not allowed inside the format string. If the string :date is added to the type name the value will be formatted as a date/time value. To format the string the DT_Format function is used.

Example

y[1]:    @f{xyvalue(Data 1, y, 1)}

y[last]: @f{xyvalue(Data 1, y, -1, %.2lf)}

Date: @f{xyvalue(Data2, x:date, 1, %c)}

@f{xyvalue(Data 1, y.name.unit, 1)}

Output:

y[1]:     123.2

y[last]:= 123.19

Date: 1.11.2007 00:00:00

speed: 1000 1/min

History

Version Description
R2021.2 Correction of ymax.enumvalue output.

id-1829138